<template>
    <div class="main m-detail">
        <img :src="img" alt="">
        <div class="detail-info">
            <div class="u-title">影片简介</div>
            <p>导　　演：{{detailInfo.director}}</p>
            <p>主　　演：{{detailInfo.actors}}</p>
            <p>地区语言：{{detailInfo.nation}} ({{detailInfo.language}})</p>
            <p>类　　型：{{detailInfo.category}}</p>
            <p>上映日期：{{detailInfo.premiereAt}}</p>
            <p class="desc">{{detailInfo.synopsis}}</p>
        </div>
        <a href="javascript:;">立即购票</a>
    </div>
</template>

<script>
    import $ from 'jquery';
    export default {
        data: function() {
            return {
                detailInfo: {},
                img: '' 
            }
        },
        mounted: function() {
        
            var url = 'http://localhost:3000/' + this.$route.params.id  + '?time=' + new Date().getTime();
            var that = this;
            $.get(url, function(res) {
                that.detailInfo = res.data.film;
                that.img = res.data.film.cover.origin;

                
                that.$store.commit('changeTitle', res.data.film.name);
            })
        }
    }
</script>

<style>
   
</style>